<meta charset="utf-8">
#{extends 'main.html' /} #{set title:'Home' /}

<div class="container">
	<div class="row">
		<div class="span6 offset3">
			<table class="table table-striped">
				<thead>
					<tr>
						<td>Name</td>
						<td class="pull-right"><span onclick="location.href='@{Item.blank(section.id)}'" class="label label-success pull-right cursor-pointer">New Item</span></td>
					</tr>
				</thead>
				<tbody>
					#{list items:section.items, as:'item'}
					<tr>
						<td class="cursor-pointer">${item.name}</td>
						<td>
							<div class="pull-right btn-group">
								<button class="btn btn-primary dropdown-toggle btn-small" data-toggle="dropdown">
									Actions <span class="caret"></span>
								</button>
								<ul class="dropdown-menu">
									<li><a href="@{Item.show(item.id, section.id)}">Update</a></li>
									<li class="divider"></li>
									<li><a href="@{Item.delete(item.id, section.id)}">Remove</a></li>
								</ul>
							</div>
						</td>
					</tr>
					#{/list}
				</tbody>
			</table>

		</div>
	</div>
	<!--/row-->
</div>
<!--/.fluid-container-->